<?php

    class Cropm extends CI_Model{

        function __construct(){
            parent::__construct();
        }

        function writeThumbToDb($params){

            $res = $this->db->insert('media', array(
            'type' => 'img', 
            'name' => '', 
            'description' => '',
            'author' => '',
            'created' => $params['created'],
            'tags' => '',
            'file' => $params['file'],
            'directory_id' => $params['directory_id'],
            'user_id' => $params['user_id'],
            'croped' => $params['croped']
            ));
            
            RETURN $this->db->insert_id();

        }

    }

?>
